<!DOCTYPE html>
 <meta charset="UTF-8"> 
<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-125261808-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-125261808-1');
</script>
<link href='https://fonts.googleapis.com/css?family=Roboto Condensed' rel='stylesheet'>
<meta name="viewport" content="width=device-width">
<style>
body {
        margin-top: 5vw;
        margin-left: 10vw;
        margin-right: 10vw;
       	padding: 0;
        font-size: 100%;
        font-family: 'Roboto Condensed', 'Tahoma', 'Arial', sans-serif;
}

#introduction {
   text-align: justify;
}


table.maintable {
   table-layout: fixed;
   border: 0px solid black;
}

table.maintable td {
   padding-right: 2vw;
   padding-left: 0.2vw;
}


   ul.tree, ul.tree ul {
     list-style-type: none;
     background:  repeat-y;
     margin: 0;
     padding: 0;
     margin: 1vw;
   }

   ul.tree ul {
     list-style-type: none;
     margin-left: 5vw;
   }


  ol li {
     list-style-type: decimal;
     margin-left: 0px;
   }

a {
    color: black;
}

   ul.tree li {
     margin: 1vw;
     padding: 0 5vw;
     line-height: 5vw;
     color: #369;
   }

   ul.tree li.last {
     background: no-repeat;
   }

ul.topnav {
    list-style-type: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    background-color: #333;
    font-size: 1.5vw;
    text-align: center;
}

ul.topnav li {float: left;
     list-style-type: none;
}

ul.topnav li a {
    display: block;
    color: white;
    text-align: center;
    padding: 0.2vw 0.0cm;
    width: 8.5vw;
    text-decoration: none;
    font-size: 1.2vw;
}


ul.topnav li a:hover:not(.active) {background-color: #111;color: white}
ul.topnav li a:hover {color: white}

ul.topnav li a.active {background-color: rgb(44, 173, 46);}
ul.topnav li.right {float: right;}

img.logo {max-width: 25vw;}

pre, code { font-size:100%; background:#eeeeee; margin:5vw 0px 5vw; }
tt { font-size: 0.5cm; }
pre { margin:0px 1vw 1vw; white-space: pre-wrap;}
pre.codeinput { padding:5vw; border:0.1vw margin:5vw 0px 5vw; solid #d3d3d3; background:#eeeeee; }
pre.codeoutput { padding:5vw; 5vw; margin:5vw 0px 5vw; color:#4c4c4c; }
pre.error { color:red; }

@media print { pre.codeinput, pre.codeoutput { word-wrap:break-word; width:100%; } }

span.keyword { color:#0000FF }
span.comment { color:#228B22 }
span.string { color:#A020F0 }
span.untermstring { color:#B20000 }
span.syscmd { color:#B28C00 }

.footer {  width: 100%;  padding:5vw 0px; margin:5vw 0px 0px; border-top:1px dotted #878787; font-size:0.8em; line-height:140%; font-style:italic; color:#878787; text-align:left; float:none; }
.footer p { margin:0px; }
.footer a { color:#878787; }
.footer a:hover { color:#878787; text-decoration:underline; }
.footer a:visited { color:#878787; }

   li {
     list-style-type: square;
     background:  repeat-y;
     padding: 0;
   }

   ul {
     list-style-type: square;
     background:  repeat-y;
     padding: 0;
     margin-left: 2vw;
   }



   ul.tree a:hover {
    background: lightgray;
    text-decoration: none;
    display: inline-block;
    width: 100%;
   }


table th { padding:1.2vw 1vw; text-align:left; vertical-align:middle; border: 0px solid #d6d4d4; font-weight:bold; }
table td { padding:1.2vw 1vw; text-align:left; vertical-align:top; border:0px solid #d6d4d4; }
table td.lfig { padding:1.2vw 1vw; text-align:left; vertical-align:middle; border:0px solid #d6d4d4; }
ul {
    list-style-type: circle;
}
</style>
</head>
<body> 
<img class="logo" src="ValoMC_logo.png" >
<ul class="topnav">
<font size="4">
  <li><a class="active" href="index.html">Home</a></li>
  <li><a href="download.html">Download</a></li>
  <li><a href="features.html">Features</a></li>
  <li><a href="installation.html">Installation</a></li>
  <li><a href="documentation.html">Documentation</a></li>
  <li class="right"><a href="about.html">About</a></li>
</font>
</ul>
<div style="padding:0px 0.5vw;">
  <table class="maintable" width="100%">
  <tr>
  <td width="60%" valign="top">
  <p style="text-align:justify">
  <div class="document" id="introduction">
<h1 class="title">Introduction</h1>
<p>ValoMC is an open source Monte Carlo code that can simulate the
passage of visible and near infrared range photons through a
medium. The implementation is based on the photon packet method. The
simulation geometry is defined using unstructured (triangular or
tetrahedral) mesh. The program solves the photon fluence in the
computation domain and the exitance at the domain boundary. It is
capable of simulating complex measurement geometries with spatially
varying optical parameter distributions and supports several types of
light sources as well as intensity modulated light. Furthermore,
attention is given to ease of use and fast problem set up with a
MATLAB (The MathWorks Inc., Natick, MA) interface. The simulation code
is written in C++ and parallelized using OpenMP.</p>
<p>ValoMC is being developed by Aleksi Leino, Aki Pulkkinen, Tuomas
Lunttila and Tanja Tarvainen at University of Eastern Finland, Kuopio,
Finland.</p>
<p>If you use ValoMC in your work, please reference it with the following
citation:</p>
<p><a class="reference external" href="https://www.osapublishing.org/osac/abstract.cfm?uri=osac-2-3-957">A.A. Leino, A. Pulkkinen and T. Tarvainen, ValoMC: a Monte Carlo
software and MATLAB toolbox for simulating light transport in
biological tissue, OSA Continuum 2, 957-972 (2019)</a></p>
<p>Click <a class="reference external" href="literature.html">here</a> to see examples of works where ValoMC has been utilised.</p>
</div>
  </p>
  </td>
  <td class="lfig">
  <img width="100%" src="digimouse2.jpg"> <br>
  Simulation using the <a href = "https://neuroimage.usc.edu/neuro/Digimouse"> digimouse model</a>.
  Model data is described in B. Dogdas, D. Stout, A. Chatziioannou, RM Leahy, <i>Digimouse: A 3D Whole Body Mouse Atlas from CT and Cryosection Data</i>, Phys. Med. Bio, 52: 577-587, 2007
  </td>
  </tr>
  <tr>
  <td width="20%">
  <div class="document" id="minimal-example">
<h1 class="title">Minimal example</h1>
<p>The following MATLAB code snippet sets up and runs a Monte Carlo simulation in a rectangular region</p>
<pre class="code matlab literal-block">
<span class="name">xsize</span> <span class="punctuation">=</span>  <span class="literal number integer">10</span><span class="punctuation">;</span>    <span class="comment">% width of the region  [mm]</span>
<span class="name">ysize</span> <span class="punctuation">=</span>  <span class="literal number integer">10</span><span class="punctuation">;</span>    <span class="comment">% height of the region [mm]</span>
<span class="name">dh</span> <span class="punctuation">=</span> <span class="literal number integer">1</span><span class="punctuation">;</span>         <span class="comment">% discretisation size  [mm]</span>
<span class="name">vmcmesh</span> <span class="punctuation">=</span> <span class="name">createRectangularMesh</span><span class="punctuation">(</span><span class="name">xsize</span><span class="punctuation">,</span> <span class="name">ysize</span><span class="punctuation">,</span> <span class="name">dh</span><span class="punctuation">);</span>

<span class="comment">% Create a light source</span>
<span class="comment">%    - Set a light source from boundary elements 4 to 7</span>
<span class="comment">%    - Photons are launched at a random angle so that all angles have a cosinic distribution</span>
<span class="name">vmcboundary</span><span class="punctuation">.</span><span class="name">lightsource</span><span class="punctuation">(</span><span class="literal number integer">4</span><span class="punctuation">:</span><span class="literal number integer">7</span><span class="punctuation">)</span> <span class="punctuation">=</span> <span class="punctuation">{</span><span class="literal string">'cosinic'</span><span class="punctuation">};</span>

<span class="comment">% Give optical parameters</span>
<span class="comment">%    - Constant optical parameters are set troughout the medium.</span>
<span class="comment">%    - Alternatively, optical parameters can set be for each element using indexing</span>

<span class="name">vmcmedium</span><span class="punctuation">.</span><span class="name">absorption_coefficient</span> <span class="punctuation">=</span> <span class="literal number float">0.01</span><span class="punctuation">;</span>     <span class="comment">% [1/mm]</span>
<span class="name">vmcmedium</span><span class="punctuation">.</span><span class="name">scattering_coefficient</span> <span class="punctuation">=</span> <span class="literal number float">1.0</span><span class="punctuation">;</span>      <span class="comment">% [1/mm]</span>
<span class="name">vmcmedium</span><span class="punctuation">.</span><span class="name">scattering_anisotropy</span> <span class="punctuation">=</span> <span class="literal number float">0.9</span><span class="punctuation">;</span>       <span class="comment">% anisotropy parameter g [unitless]</span>
<span class="name">vmcmedium</span><span class="punctuation">.</span><span class="name">refractive_index</span> <span class="punctuation">=</span> <span class="literal number float">1.3</span><span class="punctuation">;</span>            <span class="comment">% refractive index [unitless]</span>

<span class="comment">% Run the Monte Carlo simulation</span>
<span class="name">solution</span> <span class="punctuation">=</span> <span class="name">ValoMC</span><span class="punctuation">(</span><span class="name">vmcmesh</span><span class="punctuation">,</span> <span class="name">vmcmedium</span><span class="punctuation">,</span> <span class="name">vmcboundary</span><span class="punctuation">);</span>

<span class="comment">% Plot the solution using MATLAB</span>
<span class="name">patch</span><span class="punctuation">(</span><span class="literal string">'Faces'</span><span class="punctuation">,</span><span class="name">vmcmesh</span><span class="punctuation">.</span><span class="name">H</span><span class="punctuation">,</span><span class="literal string">'Vertices'</span><span class="punctuation">,</span><span class="name">vmcmesh</span><span class="punctuation">.</span><span class="name">r</span><span class="punctuation">,</span><span class="literal string">'FaceVertexCData'</span><span class="punctuation">,</span> <span class="name">solution</span><span class="punctuation">.</span><span class="name">element_fluence</span><span class="punctuation">,</span> <span class="literal string">'FaceColor'</span><span class="punctuation">,</span> <span class="literal string">'flat'</span><span class="punctuation">,</span> <span class="literal string">'LineWidth'</span><span class="punctuation">,</span><span class="literal number float">1.5</span><span class="punctuation">);</span>
</pre>
</div>
  </td>
  <td class="lfig">
  <img width="100%" src="minimalexample.png">
  </td>
  </tr>
  <td>
  <div class="document" id="news"> <h1 class="title">News</h1> <p>6.3.2022: <strong>Critical fix</strong></p><blockquote> A potentially significant error was spotted in the 3d code and fixed. We are currently investigating the magnitude of the error. It affects all 3d simulations but not the 2d simulations. We regret for any inconvenience caused. You can find the issue and join in the discussion <a href="https://github.com/InverseLight/ValoMC/issues/17">here.</a>  </blockquote>  <p>1.4.2019: <strong>Publication</strong></p> <blockquote> Research article that describes ValoMC was published in <a class="reference external" href="https://www.osapublishing.org/osac/abstract.cfm?uri=osac-2-3-957">OSA Continuum</a>.</blockquote> <p>21.2.2019:  <strong>Release candidate</strong></p> <blockquote> Version 1.0rc is now released. A number of fixes have been introduced to the MATLAB interface. From now on, we indent to minimize changes that are backward incompatible to the MATLAB interface.</blockquote> <p>28.5.2018:  <strong>Beta-release</strong></p> <blockquote> We are releasing the beta version for test use and feedback. Please note that the functionality might still change and that the code might not be fully forward compatible with later releases.</blockquote> </div>
  </td>
  <td>
  </td>

  </table>
</div>

<script>
document.body.style.fontSize = (screen.width*0.008).toString() + "px";
</script>


<br>
<br> </div><footer> <hr> <p>Last updated: Sun Mar  3 11:54:30 EEST 2022 by aleksle</p></footer> </body> </html>
